package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseData;
import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.promotion.topic.TopicVO;
import com.cskaoyan.bean.wxtopic.TopicDetailVO;
import com.cskaoyan.service.WxTopicService;
import com.cskaoyan.service.promotion.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * \* Description:
 * \
 */
@RestController
@RequestMapping("wx/topic")
public class WXTopicController {

    @Autowired
    WxTopicService wxTopicService;

    @RequestMapping("list")
    public BaseRespVo list (Integer limit ,Integer page){
        BaseData data = wxTopicService.list(limit,page);
        return BaseRespVo.ok(data);
    }

    @RequestMapping("detail")
    public BaseRespVo detail(int id){
         TopicDetailVO topicDetailVO = wxTopicService.detail(id);
        return  BaseRespVo.ok();
    }

    @RequestMapping("related")
    public BaseRespVo related(int id){
        BaseData<TopicVO> data = wxTopicService.related(id);
        return BaseRespVo.ok(data);
    }


}
